using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
	[System.Serializable, NodeMenuItem(LevelEditorConst.Execution + "/" + LevelEditorConst.AcceptQuest, typeof(LevelServiceGraph))]
    public partial class LevelServiceExecutionNode_AcceptQuest : LevelServiceExecutionNode
    {
		protected override ServiceExecutionType mServiceType => ServiceExecutionType.AcceptQuest;
        public override string name => LevelEditorConst.AcceptQuest;
		
# region property
        [LevelServiceEditorCustomProperty(ServiceExecutionType.AcceptQuest, "Quest表ID")]
        public int questCid;
# endregion property
		protected override LevelServiceCustomConfig CreateConfig()
        {
        	LevelServiceExecutionCustom_AcceptQuest rConfig;
# region CreateConfig
            rConfig = new LevelServiceExecutionCustom_AcceptQuest
            {
                questCid = this.questCid,
            };
# endregion CreateConfig
            return rConfig;
        }

        protected override void OnSync(EditorLevelServiceExecutionConfig newConfig, LevelServiceExecutionNode tempNode)
        {
# region OnSync
            if (tempNode is LevelServiceExecutionNode_AcceptQuest rNode)
            {
                this.questCid = rNode.questCid;
            }
# endregion OnSync
        }
    }
}